Skip to content

Fixes #5097. Kitty is wasting the keyboard shortcuts Ctrl+Shift+Alt+A/Z which returns as Ctrl+Alt+A/Z#5098

Merged
tig merged 8 commits intogui-cs:developfrom
BDisp:5097_kitty-ctrl-shift-alt+az-fix
Apr 28, 2026
Merged

Fixes #5097. Kitty is wasting the keyboard shortcuts Ctrl+Shift+Alt+A/Z which returns as Ctrl+Alt+A/Z#5098
tig merged 8 commits intogui-cs:developfrom
BDisp:5097_kitty-ctrl-shift-alt+az-fix

Conversation

@BDisp
Copy link
Copy Markdown
Collaborator

@BDisp BDisp commented Apr 28, 2026

Fixes

Proposed Changes/Todos

  • Add Ctrl+Shift+Alt+A/Z combinations
  • Fix AltGr+key printable keys combinations

Pull Request checklist:

  • I've named my PR in the form of "Fixes #issue. Terse description."
  • My code follows the style guidelines of Terminal.Gui - if you use Visual Studio, hit CTRL-K-D to automatically reformat your files before committing.
  • My code follows the Terminal.Gui library design guidelines
  • I ran dotnet test before commit
  • I have made corresponding changes to the API documentation (using /// style comments)
  • My changes generate no new warnings
  • I have checked my code and corrected any poor grammar or misspellings
  • I conducted basic QA to assure all features are working

BDisp and others added 2 commits April 28, 2026 01:47
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
@BDisp BDisp requested a review from tig as a code owner April 28, 2026 00:51
@tig tig requested a review from Copilot April 28, 2026 16:03
Comment thread Terminal.Gui/Drivers/AnsiHandling/KittyKeyboardPattern.cs Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses kitty keyboard protocol parsing so modifier state (notably Ctrl+Shift+Alt) is preserved correctly, and adjusts text-input widgets to allow printable AltGr-generated characters while continuing to block most Alt/Ctrl-modified key insertions.

Changes:

  • Preserve Ctrl+Shift+Alt modifier combinations when parsing kitty CSI u sequences.
  • Allow TextField/TextView to insert printable AltGr combinations (via kitty associated text) while still rejecting most modified keys.
  • Update Key shifted-printable rendering (AsGrapheme/AsRune) and expand/adjust kitty parsing tests.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
Tests/UnitTestsParallelizable/Views/TextViewTests.cs Updates Alt+letter regression test setup/comments for kitty-associated-text behavior.
Tests/UnitTestsParallelizable/Views/TextFieldTests.cs Updates Alt+letter regression test setup/comments for kitty-associated-text behavior.
Tests/UnitTestsParallelizable/Drivers/AnsiHandling/KittyKeyboardParsingTests.cs Adjusts expectations for shifted printable keys and adds modifier/AltGr regression coverage.
Tests/UnitTestsParallelizable/Drivers/AnsiHandling/KittyAlternateKeyTests.cs Updates end-to-end expectations for alternate keys with modifiers.
Terminal.Gui/Views/TextInput/TextView/TextView.Keyboard.cs Allows printable AltGr (Alt+AssociatedText) insertion while blocking other modified keys.
Terminal.Gui/Views/TextInput/TextField/TextField.Keyboard.cs Same AltGr insertion logic as TextView (with a small formatting issue).
Terminal.Gui/Input/Keyboard/Key.cs Ensures shifted alternate keycodes produce correct grapheme/rune (esp. A–Z).
Terminal.Gui/Drivers/AnsiHandling/KittyKeyboardPattern.cs Modifier-field handling changes and associated-text suppression tweaks for modified keys.

Comment thread Terminal.Gui/Drivers/AnsiHandling/KittyKeyboardPattern.cs
Comment thread Tests/UnitTestsParallelizable/Views/TextViewTests.cs
Comment thread Tests/UnitTestsParallelizable/Views/TextFieldTests.cs
Comment thread Terminal.Gui/Views/TextInput/TextField/TextField.Keyboard.cs Outdated
Comment thread Tests/UnitTestsParallelizable/Drivers/AnsiHandling/KittyKeyboardParsingTests.cs Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kitty is wasting the keyboard shortcuts Ctrl+Shift+Alt+A/Z which returns as Ctrl+Alt+A/Z

3 participants